#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>

using namespace std;

int findCenter(vector<vector<int>>& edges) {
    int n = edges.size() + 1;
    vector<int> m(n + 1);
    for (auto& edge : edges)
    {
        m[edge[0]]++;
        m[edge[1]]++;
    }
    for (int i = 1;; i++)
        if (m[i] == n - 1)
            return i;
}